/*
 * Copyright © 2017 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@import '../../styles/variables.scss';

$border-color: #bbbbbb;

.dataentity-table {
  padding-top: 10px;
  overflow: auto;
  .table {
    border: 1px solid $border-color;

    tr {
      th,
      td {
        border-left: 0;
        border-right: 0;
        border-top: 0;
        border-bottom: 1px solid $border-color;
        padding-top: 0;
        padding-bottom: 0;
        vertical-align: middle;

        &:first-child {
          padding-left: 0.75rem;
        }

        &:last-child {
          padding-left: 1%;
        }

        &:nth-child(3),
        &:nth-child(4),
        &:nth-child(5),
        &:nth-child(6) {
          text-align: right;
        }
      }

      th {
        line-height: 30px;
        &:nth-child(2) {
          min-width: 75px;
        }
        &:last-child {
          min-width: 215px;
        }
      }

      td {
        line-height: 40px;
      }
    }

    tbody {
      font-size: 12px;

      tr {
        &:hover {
          background-color: white;
          cursor: pointer;
        }

        a {
          color: inherit;
          display: inline-block;
          vertical-align: top;

          &:hover {
            text-decoration: none;
          }
        }

        td {
          &:first-child {
            max-width: 110px;

            a {
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
              width: 100%;
            }
          }

          &:last-child {
            min-width: 215px;
            .fast-actions-container {
              min-width: 215px;
              max-width: 400px;

              h4 {
                margin: 0;
                > span {
                  border: 0;
                  padding: 0;
                  vertical-align: top;
                  display: inline-block;
                  background: transparent;
                  &:hover {
                    background: transparent;
                  }
                }
              }
            }
          }

          [class^="icon-"].fa,
          [class*=" icon-"].fa {
            margin-right: 5px;
          }

          .fast-actions-container .btn-link {
            color: #4f5050;
            max-width: 40px;
            > span {
              vertical-align: top;
            }
          }
        }
      }
    }
  }
}
